home *** CD-ROM | disk | FTP | other *** search
- #APP
- | minimal gcc startup file
- .globl __stksize
- .globl __start
- .globl _main
-
- .even
- .text
- __start:
- movl a7@(4), a5 | Fetch base page pointer
- movl a5@(24), a1 | Fetch bss base
- addl a5@(28), a1 | + size of bss
- | Allocate stack, a1 points beyond vectors
- addl __stksize, a1 | Allocate _stksize_ bytes of stack
- movl a1, a7 | Set the initial stack.
- | Release unused memory to the system pool.
- subl a5, a1 | Compute size of retained memory
- movl a1, a7@-
- movl a5, a7@- | Base of retained memory
- clrw a7@- | Must be zero
- movw #0x4A, a7@- | Mshrink opcode
- trap #1 | Gemdos
- lea a7@(12), a7 | Pop arguments
- | Call main() no args passed to main
- subl a6, a6 | Zero frame pointer
- jbsr _main | Call main line
- | Exit with return from main
- clrw a7@- | Pterm0()
- trap #1
-